import { readdirSync, existsSync, mkdirSync } from 'fs';
import { join } from 'path';
import { Mod } from './Mod';

export class ModLoader {
	constructor() {
		const path: string = './mods';
		// 创建文件夹
		if (!existsSync(path)) mkdirSync(path);
		// 读取加载
		readdirSync(path).forEach((value) => {
			new Mod(join(path, value));
		});
	}
}
